package com.neteast.bustruck.db.dao

import androidx.room.Dao
import androidx.room.Delete
import androidx.room.Insert
import androidx.room.Query
import androidx.room.Update
import com.neteast.bustruck.db.entiys.LocalSaveInfo

@Dao
interface LocalSaveInfoDao {


    @Query("SELECT * FROM savebaseinfo")
    suspend fun getAllList():List<LocalSaveInfo>?

    @Query("SELECT * FROM savebaseinfo WHERE `action` LIKE :action")
    suspend fun getLocalBaseInfo(vararg action:String):LocalSaveInfo?

    @Insert
    suspend fun insertList( info:LocalSaveInfo):Long


    @Update
    suspend fun updateLocalInfo(vararg info:LocalSaveInfo) :Int


    @Delete
    suspend fun deleteAll(list:List<LocalSaveInfo>):Int


}